//@ sourceURL=ExistingProblemsForm.js
ExistingProblemsForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        ExistingProblemsForm.superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "添加",
            iconCls : "menu-flowWait",
            width : 620,
            height : 450
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/relatedparty/saveExistingProblems.do",
                items:[
                       {
                           id : "existingProblems.id",
                           name : "existingProblems.id",
                           xtype : "hidden",
                           value : this.id == null ? "": this.id
                       }, {
                           name : "existingProblems.sceneTaskManageId",
                           xtype : "hidden",
                           id : "existingProblems.sceneTaskManageId",
                           value : this.sceneTaskManageId == null ? "" : this.sceneTaskManageId
                       },{
                           layout:"column",
                           bodyStyle:"padding:5px;",
                           items:[{
                          layout:"form",
                          columnWidth:.5,
                          border:false,
                          bodyStyle:"padding:5px;",
//                        True表示为显示出面板body元素的边框，false则隐藏
                          defaultType:"textfield",
                          items:[{
                              fieldLabel:'隐患类型'+'<font color=red>*</font>',
                              id:"existingProblems.problemType",
                              name:"existingProblems.problemType",
                             // maxLength:80,
                              allowBlank:false,
                              blankText:"隐患类型不能为空！"
                          }]
                      },{
                          layout:"form",
                          columnWidth:.5,
                          bodyStyle:"padding:5px;",
                          border:false,
//                        True表示为显示出面板body元素的边框，false则隐藏
                          defaultType:"textfield",
                          items:[{
                              fieldLabel:"隐患等级",
                              id:"existingProblems.problemGrade",
                              name:"existingProblems.problemGrade",
                              allowBlank:true
                              
                          }]
                      }]
                       },{
                   layout:"column",
                   bodyStyle:"padding:5px;",
                   items:[{
                       columnWidth:1.,//第一列 
                       layout:"form", 
                       bodyStyle:"padding:5px;",
                       items:[{ 
                           xtype:"textarea", 
                           fieldLabel: '隐患描述', 
                           name: 'existingProblems.problemDescribe', 
                           width:448 
                           }] 
                  },{
                      columnWidth:1.,//第一列 
                      layout:"form", 
                      bodyStyle:"padding:5px;",
                      items:[{ 
                          xtype:"textarea", 
                          fieldLabel: '备注', 
                          name: 'existingProblems.remark', 
                          width:448 
                          }] 
                 }]
               }]
            },
        loadData:{
            getUrl:__ctxPath +"/relatedparty/getExistingProblems.do",
            preName : "existingProblems"
        },
        isShow:this.isShow
    });
}
});
